﻿<UserControl x:Class="Hisaab.Client.Modules.Core.Management.View.UserManagementView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:h="clr-namespace:Hisaab.Client.Common.Helpers;assembly=Hisaab.Client.Common" 
             xmlns:ribbon="clr-namespace:Fluent;assembly=Fluent" Style="{DynamicResource BackStageControl}">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="500" />
        </Grid.ColumnDefinitions>
        <StackPanel>
            <StackPanel Orientation="Horizontal">
                <Image  VerticalAlignment="Center" Stretch="None" Source="pack://application:,,,/Hisaab.Client.Common;component/Resources/Images/48/User.png"  />
                <Label Content="User Management" VerticalContentAlignment="Center" Style="{DynamicResource BackstageLabelBig}" />
            </StackPanel>

            <Label Content="Change Password" HorizontalAlignment="Left" VerticalAlignment="Center" Style="{DynamicResource BackstageLabelSmall}" />
            <Image Source="pack://application:,,,/Hisaab.Client.Common;component/Resources/Images/dottedline.png" HorizontalAlignment="Left" />

            <Label Content="Old Password" Style="{DynamicResource BackstageLabel}" />
            <PasswordBox VerticalAlignment="Top" Height="24" HorizontalAlignment="Stretch" h:PasswordHelper.Password="{Binding OldPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

            <Label Content="New Password" Style="{DynamicResource BackstageLabel}" />
            <PasswordBox VerticalAlignment="Top" Height="24" HorizontalAlignment="Stretch" h:PasswordHelper.Password="{Binding NewPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

            <Label Content="Confirm Password" Style="{DynamicResource BackstageLabel}" />
            <PasswordBox VerticalAlignment="Top" Height="24" HorizontalAlignment="Stretch" h:PasswordHelper.Password="{Binding ConfirmPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

            <ribbon:Button VerticalAlignment="Center" HorizontalAlignment="Right" Style="{DynamicResource ButtonBackstageStyleSmall}"
                            Icon="pack://application:,,,/Hisaab.Client.Common;component/Resources/Images/16/Key.png" Width="140" Height="25" Command="{Binding ChangePasswordCommand}">Change Password</ribbon:Button>

            <Label Content="Secret Question" HorizontalAlignment="Left" VerticalAlignment="Center" Style="{DynamicResource BackstageLabelSmall}" />
            <Image Source="pack://application:,,,/Hisaab.Client.Common;component/Resources/Images/dottedline.png" Stretch="None" HorizontalAlignment="Left" VerticalAlignment="Center" />

            <Label Content="Question" Style="{DynamicResource BackstageLabel}" />
            <TextBox VerticalAlignment="Top" Height="24" HorizontalAlignment="Stretch" Text="{Binding SecretQuestion, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

            <Label Content="Answer" Style="{DynamicResource BackstageLabel}" />
            <TextBox VerticalAlignment="Top" Height="24" HorizontalAlignment="Stretch" Text="{Binding SecretAnswer, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

            <ribbon:Button VerticalAlignment="Center" HorizontalAlignment="Right" Style="{DynamicResource ButtonBackstageStyleSmall}"
                            Icon="pack://application:,,,/Hisaab.Client.Common;component/Resources/Images/16/save.png" Width="140" Height="25" Command="{Binding UpdateSecretQuestionCommand}">Update</ribbon:Button>

            <Label Content="{Binding Message}" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Foreground="{Binding MessageColor}" FontSize="14" />

            <Line Grid.Column="4" Grid.RowSpan="17" Fill="{DynamicResource VerticalLineBrush}" Width="5" />
        </StackPanel>
    </Grid>
</UserControl>